package com.lvt.design.pattern.module.stat.v3;

import com.google.gson.Gson;

import java.util.Map;

/**
 * @author LT
 * @date 2023年02月22日 23:34
 */
public class ConsoleViewer implements StatViewer {
    @Override
    public void output(Map<String, RequestStat> requestStats, long startTimeInMills, long endTimeInMills) {
        System.out.println("Time Span: [" + startTimeInMills + ", " + endTimeInMills + "]");
        Gson gson = new Gson();
        System.out.println(gson.toJson(requestStats));
    }
}
